package com.wang.bootbuilder.controller;

import com.wang.bootbuilder.tools.JsonResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@CrossOrigin
@RequestMapping("/manage/img")
@Api(value = "/manage/img", description = "处理图片上传的controller")
public class ImageUploaderController {

    /*
    处理上传图片
     */
    @PostMapping("/upload")
    public JsonResult uploadFile(@RequestParam("image") MultipartFile file) {
        // return ossUploadService.imgFileUpload(file);
        return JsonResult.ok();
    }

    /*
    处理删除图片
     */
    @PostMapping("/delete")
    public JsonResult deleteFile() {
        return JsonResult.ok();
    }
}
